<html>
    <script>
        //1 使用setTimeOut

        //resolve,regect本身也是个函数
        new Promise((resolve,regect)=>{
            setTimeout(() => {
              resolve()
        }, 1000);
        }).then(()=>{
            console.log("huran")
            return new Promise((resolve,regect)=>{
                setTimeout(() => {
                        resolve()
                }, 1000);
            }).then(()=>{
                console.log("huran")
                return new Promise((resolve,regect)=>{
                    setTimeout(() => {
                        resolve()
                    }, 1000);
                }).then(()=>{
                    console.log("huran")
                })
            })
    }).catch((err)=>{
        console.log(err)
    })
    </script>
    
   
</html>